import styled from 'styled-components'
import logoPic from '../../static/logo.jpeg'
export const HeaderWrapper = styled.div`
  position: relative;
  height: 57px;
  border-bottom: 1px solid #f0f0f0;
  z-index:1;
`

export const Logo = styled.div`
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 56px;
  display: block;
  background-image: url(${logoPic});
  background-size: contain;
  background-repeat: no-repeat;
`

export const Nav = styled.div`
  width: 960px;
  padding-right: 70px;
  height: 100%;
  margin: 0 auto;
`

export const NavItem = styled.div`
  line-height: 56px;
  padding: 0 15px;
  font-size: 17px;
  color: #333;
  &.left{
    float: left;
  }
  &.right{
    float: right;
  }
  &.active{
    color: #ea6f5a;
  }
`
export const SearchWrapper = styled.div`
  position: relative;
  height: 38px;
  line-height: 38px;
  background-color: #F2F2F2;
  margin-top: 9px;
  margin-left: 20px;
  padding: 0 10px;
  border-radius: 18px;
  float: left;
  // overflow: hidden;
  .search-icon{
    position: absolute;
    top: 50%;
    right: 6px;
    line-height: 0;
    z-index: 2;
    color: #969696;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    &.focused {
      background-color: #777;
      color: #fff;
    }
  }
`
export const SearchInfo = styled.div`
  position:absolute;
  left: 0;
  top: 56px;
  width: 240px;
  padding: 0 20px;
  box-shadow: 0 0 8px rgba(0,0,0,.2);
  background: #fff;
`
export const SearchInfoTitle = styled.div`
  position: relative;
  margin-top: 20px;
  margin-bottom: 15px;
  line-height: 20px;
  font-size: 14px;
  color: #969696;
`

export const SearchInfoSwitch = styled.span`
  position: relative;
  float: right;
  font-size: 12px;
  overflow: hidden;
  .spin{
    float: left;
    display:block;
    margin-right: 5px;
    font-size: 12px;
    transition: all .2s ease-in;
    transform: rotate(90deg);
    transform-origin: center center;
  }
`

export const SearchInfoList = styled.div`
  margin-top: 10px;
  overflow: hidden;
`

export const SearchInfoItem = styled.a`
  line-height: 20px;
  font-size: 12px;
  float: left;
  padding: 2px 4px;
  border: 1px solid #ddd;
  color: #787878;
  border-radius: 3px;
  display:block;
  margin-right: 10px;
  margin-bottom: 10px;
`
export const NavSearch = styled.input.attrs({
  placeholder: '搜索'
})`
  border: none;
  float: left;
  outline:none;
  width: 160px;
  height: 38px;
  background-color: transparent;
  font-size: 14px;
  padding: 8px 36px 8px 16px;
  color: #666;
  transition: all 0.2s ease-out;
  &.slide-enter-done,
  &.slide-enter.slide-enter-active{
    width: 240px;
  }
  &::placeholder{
    color: #999;
  }
`

export const Addition = styled.div`
  position: absolute;
  right: 0;
  top: 0;
  height: 56px;
`
export const Button = styled.div`
  float: right;
  line-height: 38px;
  border-radius: 19px;
  margin-top: 9px;
  margin-right: 20px;
  border: 1px solid #ec6149;
  padding: 0 20px;
  font-size: 14px;
  &.reg{
    color: #ec6149
  }
  &.writing{
    color: #fff;
    background: #ec6149;
  }
`
